package com.empire.module.member.controller.admin.warninggather.vo;

import lombok.Data;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

/**
 * 活跃聚集内部类
 */
@Data
public class ActiveGather {
    @Setter
    private Long id;
    private final List<LocationPointVO> points = new ArrayList<>();
    @Setter
    private boolean completed = false;

    public void addPoint(LocationPointVO point) {
        points.add(point);
    }

    public void merge(ActiveGather other) {
        this.points.addAll(other.points);
        if (this.id == null) {
            this.id = other.id;
        }
    }

    @Data
    public static class DataHubLocationVO {
        /**
         * 来源号码
         */
        private String idNumber;
        /**
         * 证件类型：1-QQ号；2-微信号
         */
        private Integer idType;
        /**
         * 定位时间
         */
        private String locateTime;
        /**
         * 高德经度
         */
        private double lng;
        /**
         * 高德纬度
         */
        private double lat;
        /**
         * 详细地址
         */
        private String address;
    }
}
